"""
Event.py


"""
from time import sleep
from selenium import webdriver
from conf.env import url
from pages.pages import LoginPage


class Event:
    @staticmethod
    def event_login(driver,username,password):
        login = LoginPage(driver)
        login.type_account(username)
        login.wait(2)
        login.type_password(password)
        login.wait(2)
        login.type_submit()
        # 获取 页面的断言结果
        # return login.assret_text()


    # def event_add(self):
    #     Event.event_login()
    #     #MG

if __name__ == '__main__':
    driver = webdriver.Chrome()
    driver.maximize_window()
    sleep(2)
    driver.get(url)
    Event.event_login(driver,"admin", "123456")